package _Collection;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.Scanner;

public class _Genericity {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        ArrayList<String> stringArrayList = new ArrayList<>();
        while (scanner.hasNext()){
            stringArrayList.add(scanner.next());
        }
        // ---------------------Begin------------------------
        // 增
        stringArrayList.add("educode");
        // 遍历
        Iterator<String> it = stringArrayList.iterator();
        int i = 1;
        while(it.hasNext()){
            String element = it.next();
            System.out.println("第" + i++ + "个元素为：" + element);
        }

        // ---------------------End------------------------

    }
}

